package com.leigang.java.code.design.mode.observer.display;

import com.leigang.java.code.design.mode.observer.Observer;

public class DyDisplay implements Observer {
    private final String name;

    public DyDisplay(String name) {
        this.name = name;
    }

    @Override
    public void update(String weather) {
        System.out.println(name + " 收到天气更新: " + weather);
    }
}
